﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using controls = System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using forms = System.Windows.Forms;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

using Omniscient.Foundation.ApplicationModel.Presentation;
using Omniscient.Foundation.Data;
using Omniscient.TimeTracker.Data;
using Omniscient.TimeTracker.Presentation;
using Omniscient.Foundation.ApplicationModel;


namespace Omniscient.TimeTracker
{
    /// <summary>
    /// Interaction logic for Main.xaml
    /// </summary>
    public partial class Main : Window
    {
        private NotifierTray _notifierTray;

        public Main()
        {
            InitializeComponent();
            _notifierTray = new NotifierTray(this);
        }


        protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
        {
            _notifierTray.Dispose();
            base.OnClosing(e);
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            ClientAdapterMock mock;
            mock = new ClientAdapterMock();

            ClientProjectTaskModel model;
            model = new ClientProjectTaskModel(mock.LoadAll());

            //Omniscient.Foundation.ApplicationModel.Application.Current.PresentationController.OpenView(model);
            ClientProjectTaskView view = new ClientProjectTaskView();
            view.Model = model;
            view.UpdateView();
            Window w = new Window();
            w.Content = view;
            w.ShowDialog();
        }

    }
}
